<?php

namespace app\shopConsole\validate;

use think\Validate;

class FerightValidate extends Validate
{
    protected $rule = [
        'name|名字'        => 'require',
        'type|计费方式'         => 'require|number',
        'min_amount|初始运费'   => 'require|number',
        'per_amount|运费递增值' => 'require|number',
        'min_unit|初始量'       => 'require|number',
        'per_unit|递增量'       => 'require|number',
        'page|页码'         => 'require|number',
        'perPage|每页数量'   => 'require|number',
    ];

    protected $scene = [
        'create' => ['name', 'type', 'min_amount', 'per_amount', 'min_unit', 'per_unit'] ,
        'update' => ['name', 'type', 'min_amount', 'per_amount', 'min_unit', 'per_unit'] ,
        'get'    => ['page', 'perPage'] ,
    ];

}